package br.iars.web.model.entity;

public class Preference extends GenericEntity<Long> {

	private static final long serialVersionUID = -8451893440525022517L;
	private Item item;
	private Context context;
	private Double rate;

	public Preference() {
		super();
		this.rate = 0.0;
	}

	public Preference(Long id) {
		super(id);
		this.rate = 0.0;
	}

	public Preference(Item item, Context context) {
		super();
		this.item = item;
		this.context = context;
	}

	public Preference(Item item, Context context, Double rate) {
		super();
		this.item = item;
		this.context = context;
		this.rate = rate;
	}

	public Item getItem() {
		return item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	public Context getContext() {
		return context;
	}

	public void setContext(Context context) {
		this.context = context;
	}

	public Double getRate() {
		return rate;
	}

	public void setRate(Double rate) {
		this.rate = rate;
	}

	@Override
	public String toString() {
		return "Preference [context=" + context + ", item=" + item + ", rate=" + rate + "]";
	}

}
